package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the PTESTSTAT database table.
 * 
 */
@Embeddable
public class PteststatPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long testnumber;
	private java.util.Date runwhen;

    public PteststatPK() {
    }

	@Column(unique=true, nullable=false)
	public long getTestnumber() {
		return this.testnumber;
	}
	public void setTestnumber(long testnumber) {
		this.testnumber = testnumber;
	}

    @Temporal( TemporalType.DATE)
	@Column(unique=true, nullable=false)
	public java.util.Date getRunwhen() {
		return this.runwhen;
	}
	public void setRunwhen(java.util.Date runwhen) {
		this.runwhen = runwhen;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PteststatPK)) {
			return false;
		}
		PteststatPK castOther = (PteststatPK)other;
		return 
			(this.testnumber == castOther.testnumber)
			&& this.runwhen.equals(castOther.runwhen);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.testnumber ^ (this.testnumber >>> 32)));
		hash = hash * prime + this.runwhen.hashCode();
		
		return hash;
    }
}